<%-- 
    Document   : admin
    Created on : Nov 6, 2012, 12:19:08 AM
    Author     : tinvukhac
--%>

<%@page import="Objects.User"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>My Photos</title>
        <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/css/styles.css"/>
        <style type="text/css">
            #gradient-style
            {
                font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
                font-size: 12px;
                margin: 45px;
                width: 620px;
                text-align: left;
                border-collapse: collapse;
            }
            #gradient-style th
            {
                font-size: 13px;
                font-weight: normal;
                padding: 8px;
                background: #b9c9fe url('<%= request.getContextPath()%>/images/gradhead.png') repeat-x;
                border-top: 2px solid #d3ddff;
                border-bottom: 1px solid #fff;
                color: #039;
            }
            #gradient-style td
            {
                padding: 8px; 
                border-bottom: 1px solid #fff;
                color: #669;
                border-top: 1px solid #fff;
                background: #e8edff url('<%= request.getContextPath()%>/images/gradback.png') repeat-x;
            }
            #gradient-style tfoot tr td
            {
                background: #e8edff;
                font-size: 12px;
                color: #99c;
            }
            #gradient-style tbody tr:hover td
            {
                background: #d0dafd url('<%= request.getContextPath()%>/images/gradhover.png') repeat-x;
                color: #339;
            }
        </style>
    </head>

    <body>
        <!-----------------------HEADER------------------------------------------------->
        <div id="top">
            <div id="account-bar">
                <div class="setting space">
                    <a class="bgspace" href="#">
                        <img src="<%= request.getContextPath()%>/images/setting.png" />
                    </a>
                </div>
                <div class="icon space">
                    <a class="bgspace" href="#">
                        <img src="<%= request.getContextPath()%>/images/icon.png"/>
                    </a>
                </div>
                <a href="Profile.html" class="userName">Hoang Yen</a>
            </div>

            <div class="clear"></div>

            <div class="banner">
                <div class="logo">
                    <img src="<%= request.getContextPath()%>/images/logo1.png" />
                </div>
                <div class="top-tab">
                    <div class="top-tab-active">
                        <div class="top-tab-txt">
                            <a href="<%= request.getContextPath()%>/MyPhotos.html"> My Photos</a>
                        </div>
                    </div>
                </div>
                <div class="top-tab">
                    <div class="top-tab-inactive">
                        <div class="top-tab-txt">
                            <a href="<%= request.getContextPath()%>/Explore.html"> Explore</a>
                        </div>
                    </div>
                </div>

                <div class="upload">
                    <a href="<%= request.getContextPath()%>/UpLoad.html">Upload</a>
                </div>

                <div class="search">
                    <div class="search-form">
                        <form id="search-form" method="get" action="/lh/view" name="search-form">
                            <input id="search" type="text" value="" maxlength="128" size="25" name="q">
                                <input class="search-button" type="submit" value="Search">
                                    </form>
                                    </div>
                                    </div>

                                    </div>
                                    </div>
                                    <!-----------------------CONTENT------------------------------------------------->
                                    <%
                                        List userList = new ArrayList();
                                        userList = (List) request.getAttribute("userList");
                                        User tempUser;
                                    %>
                                    <div id="content">
                                        <div id="left">
                                            <div class="context-box">
                                                <div>
                                                    <img src="<%= request.getContextPath()%>/images/tbnRecent.png">
                                                        <span> Albums </span>
                                                        <span><a href="#">Edit visibility</a></span>
                                                </div>
                                            </div>

                                            <table id="gradient-style" summary="Meeting Results">
                                                <thead>
                                                    <tr>
                                                        <th scope="col">User</th>
                                                        <th scope="col">Report</th>
                                                        <th scope="col">Warning level</th>
                                                        <th scope="col">Block</th>
                                                        <th scope="col">Block</th>
                                                        <th scope="col">Block</th>
                                                        <th scope="col">Expiration</th>
                                                        <th scope="col">Unblock</th>
                                                    </tr>
                                                </thead>
                                                <tfoot>
                                                    <tr>
                                                        <td colspan="4">Use this table to manage users</td>
                                                    </tr>
                                                </tfoot>
                                                <tbody>
                                                    <%
                                                        for(int i = 0; i < userList.size(); i++)
                                                           {
                                                            tempUser = (User)userList.get(i);
                                                            %>
                                                            <tr>
                                                        <td><%= tempUser.getUserName() %></td>
                                                        <td><%= tempUser.getCurrentPoint() %></td>
                                                        <td><%= tempUser.getWarnLevel() %></td>
                                                        <td>
                                                            <div style="float:left;">
                                                                <a href="<%= request.getContextPath()%>/admin/blockUser.htm?userId=<%= tempUser.getUserId() %>&type=1">1 week&nbsp</a>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div style="float:left;">
                                                                <a href="<%= request.getContextPath()%>/admin/blockUser.htm?userId=<%= tempUser.getUserId() %>&type=2">1 month&nbsp</a>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div style="float:left;">
                                                                <a href="<%= request.getContextPath()%>/admin/blockUser.htm?userId=<%= tempUser.getUserId() %>&type=3">Forever</a>
                                                            </div>
                                                        </td>
                                                        <td><%= tempUser.getExpirationDate() %></td>
                                                        <td>
                                                            <div style="float:left;">
                                                                <a href="<%= request.getContextPath()%>/admin/unblockUser.htm?userId=<%= tempUser.getUserId() %>">Unblock</a>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                        <%}
                                                    %>
                                                    
                                                </tbody>
                                            </table>
                                            <div class="clear"></div>

                                        </div>
                                    </div>

                                    <div id="right">
                                        <div class="contact">
                                            <div class="avatar">
                                                <img src="<%= request.getContextPath()%>/images/avt.png" />
                                            </div>
                                            <div class="name">
                                                <a href="#"> Hoang Yen</a>
                                                <br />
                                                <a href="#"> Photos</a>
                                            </div>

                                            <div class="context-box-right">
                                                <div>
                                                    <span> Recent comment </span>
                                                    <span><a href="#">View All</a></span>
                                                </div>
                                                <div>
                                                    <span> People in my photos </span>
                                                    <span><a href="#">View All</a></span>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                    </div>

                                    <div id="footer">
                                        <p id="copyright"> Powered by 4nSE, SE K53, Hanoi University of Science and Techonogy.</p>
                                    </div>

                                    </body>
                                    </html>